package br.unb.statistic.inference;

public class VarianceTimePlotEstimator extends HEstimator {

    public VarianceTimePlotEstimator(Inference inference) {
        super(inference);
    }

    public double getHurst() {

        final int len = 10;
        double[] vars = new double[len], x = new double[len];

        for (int i = 0; i < len; i++) {
            vars[i] = Math.log(inference.getAggregatedVar(i + 1));
            x[i] = Math.log(i + 1);
        }

        double beta = Inference.slope(x, vars);
        return 1 + beta / 2;
    }
}
